<template>
    <div>
        <van-nav-bar title="购物车" />

    </div>
    <van-tabs v-model:active="active">
        <van-tab title="全部">
            <p><span>待支付</span><span>29分{{ time }}秒</span></p>
            <van-card num="2" price="2.00" desc="描述信息" title="商品标题"
                thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg" />
            <span>
                <van-button type="default">取消支付</van-button>
                <van-button type="default" style="border: 1px solid orange; margin-left: 10px;"
                    @click="to">立即支付</van-button>
            </span>
        </van-tab>
        <van-tab title="待支付">内容 2</van-tab>

    </van-tabs>
</template>

<script setup>
import { ref } from 'vue'

const active = ref(0)
let time = ref(30)
let timer
timer = setInterval(() => {
    time.value--
}, 1000)
import { useRouter } from 'vue-router'
const router = useRouter()
const to = () => {
    router.push('/dd')
}
</script>

<style lang="scss" scoped></style>